package tinybase.basic;

import java.nio.ByteBuffer;

public class ByteArrayUtility {
	
	public static final int INT_SIZE = 4;
	
	public static void putInt(byte[] data, int offset, int val) {
		ByteBuffer.wrap(data).putInt(offset, val);
	}
	
	public static int getInt(byte[] data, int offset) {
		return ByteBuffer.wrap(data).getInt(offset);
	}
	
	public static void putShort(byte[] data, int offset, short val) {
		ByteBuffer.wrap(data).putShort(offset, val);
	}
}
